const crypto = require('crypto')
var giteeTimestamp = '1622709348377'
var password = '123456'
var token = '3TpeO8/mlkTw2JFOpS3tBUszzULgU/7NkzJqbyvVzAg='
var source = giteeTimestamp + '\n' + password
// var cipher = crypto
//   .createHash('SHA256')
//   .update(source)
//   .digest('hex')
var cipher = crypto
  .createHmac('SHA256', password)
  .update(source)
  .digest('base64')
var cipher2 = encodeURI(cipher)
console.log(cipher, cipher2, token, token === cipher2)
